package com.lyh.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lyh.system.mapper.ReceiveAddressMapper;
import com.lyh.system.domain.ReceiveAddress;
import com.lyh.system.service.IReceiveAddressService;

/**
 * 收货地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-11
 */
@Service
public class ReceiveAddressServiceImpl implements IReceiveAddressService 
{
    @Autowired
    private ReceiveAddressMapper receiveAddressMapper;

    /**
     * 查询收货地址
     * 
     * @param id 收货地址主键
     * @return 收货地址
     */
    @Override
    public ReceiveAddress selectReceiveAddressById(Long id)
    {
        return receiveAddressMapper.selectReceiveAddressById(id);
    }

    /**
     * 查询收货地址列表
     * 
     * @param receiveAddress 收货地址
     * @return 收货地址
     */
    @Override
    public List<ReceiveAddress> selectReceiveAddressList(ReceiveAddress receiveAddress)
    {
        return receiveAddressMapper.selectReceiveAddressList(receiveAddress);
    }

    /**
     * 新增收货地址
     * 
     * @param receiveAddress 收货地址
     * @return 结果
     */
    @Override
    public int insertReceiveAddress(ReceiveAddress receiveAddress)
    {
        return receiveAddressMapper.insertReceiveAddress(receiveAddress);
    }

    /**
     * 修改收货地址
     * 
     * @param receiveAddress 收货地址
     * @return 结果
     */
    @Override
    public int updateReceiveAddress(ReceiveAddress receiveAddress)
    {
        return receiveAddressMapper.updateReceiveAddress(receiveAddress);
    }

    /**
     * 批量删除收货地址
     * 
     * @param ids 需要删除的收货地址主键
     * @return 结果
     */
    @Override
    public int deleteReceiveAddressByIds(Long[] ids)
    {
        return receiveAddressMapper.deleteReceiveAddressByIds(ids);
    }

    /**
     * 删除收货地址信息
     * 
     * @param id 收货地址主键
     * @return 结果
     */
    @Override
    public int deleteReceiveAddressById(Long id)
    {
        return receiveAddressMapper.deleteReceiveAddressById(id);
    }
}
